﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminCP/Views/Shared/ViewMasterPage1.Master"
    Inherits="System.Web.Mvc.ViewPage<InfoTech.Mvc.LanTranh.MucVu.Models.HOGIADINH_GIAODANModel>" %>

<%@ Import Namespace="InfoTech.LanTranh.MucVu.Bussiness" %>
<%@ Import Namespace="InfoTech.LanTranh.MucVu.Service" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%
        GIAODAN chuho = ViewData["CHUHO"] as GIAODAN;
        GIAODAN giaodan = ViewData["GIAODAN"] as GIAODAN;
        HOANCANHKINHTE hoancanhkt = ViewData["HOANCANHKINHTE"] as HOANCANHKINHTE;
        string tenchuho = "", hoancanhkinhte = "", diachi = "", dienthoai = "", tennhankhau = "", diachinhankhau = "", dienthoainhankhau = "", machuho = "", manhankhau = "";
        if (chuho != null)
        {
            tenchuho = string.Format("{0} {1} {2}", chuho.TENTHANH, chuho.HOVATENDEM, chuho.TEN);
            diachi = chuho.DIACHI;
            dienthoai = chuho.DIENTHOAI;
            machuho = chuho.MAGIAODAN + "";
        }
        if (hoancanhkt != null)
        {
            hoancanhkinhte = hoancanhkt.TENHOANCANHKINHTE;
        }
        if (giaodan != null)
        {
            tennhankhau = string.Format("{0} {1} {2}", giaodan.TENTHANH, giaodan.HOVATENDEM, giaodan.TEN);
            diachinhankhau = giaodan.DIACHI;
            dienthoainhankhau = giaodan.DIENTHOAI;
            manhankhau = giaodan.MAGIAODAN + "";
        }
    %>
    <div class="content-box">
        <div class="content-box-header">
            <h3>
                Thêm Nhân Khẩu</h3>
        </div>
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <%
                Html.EnableClientValidation(); %>
            <% 
                using (Html.BeginForm())
                {%>
            <%: Html.ValidationSummary() %>
            <%:Html.HiddenFor(c=>c.MAHOGIADINH) %>
            <%:Html.HiddenFor(c=>c.MAGIAODAN) %>
            <table cellpadding="3" cellspacing="3">
                <tr>
                    <td class="title" colspan="5">
                        Thông Tin Hộ Gia Đình
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Tên Chủ Hộ:
                    </td>
                    <td>
                        <%=Html.ActionLink(tenchuho,"EditGiaoDan",new {id=machuho}) %>
                    </td>
                    <td width="10">
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Hoàn Cảnh Kinh Tế:
                    </td>
                    <td>
                        <%=hoancanhkinhte %>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Địa Chỉ:
                    </td>
                    <td>
                        <%=diachi %>
                    </td>
                    <td>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Điện Thoại:
                    </td>
                    <td>
                        <%=dienthoai %>
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="title" colspan="5">
                        Thông Tin Nhân Khẩu:
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Tên Nhân Khẩu:
                    </td>
                    <td>
                        <%=Html.ActionLink(tennhankhau,"EditGiaoDan",new {id=manhankhau}) %>
                    </td>
                    <td width="10">
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Địa Chỉ:
                    </td>
                    <td>
                        <%=diachinhankhau %>
                    </td>
                    <td>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Điện Thoại:
                    </td>
                    <td>
                        <%=dienthoainhankhau %>
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="title" colspan="5">
                        Quan Hệ Với Chủ Hộ
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Quan Hệ:
                    </td>
                    <td colspan="4">
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAQUANHEGIATOC, QUANHEGIATOCService.Get_List(), new { style = "width: 250px", @class = "text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAQUANHEGIATOC, "(*)")%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                    </td>
                    <td>
                        <input type="submit" value="Thêm mới Nhân Khẩu" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
            <% } %>
        </div>
        <!-- End .content-box-content -->
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderCss" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderScript" runat="server">
</asp:Content>
